#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#define OFFSETOF(type,name)  (unsigned int)&(((type*)0)->name)


struct S
{
	int a;
	char c;
	double b;
};

int main()
{
	struct S s = { 0 };
	printf("%u\n", OFFSETOF(struct S, a));
	printf("%u\n", OFFSETOF(struct S, c));
	printf("%u\n", OFFSETOF(struct S, b));

	return 0;
}